package com.ziyun.pop.rest.module.order;

import com.ziyun.pop.common.utils.UserUtils;
import com.ziyun.pop.modules.order.service.OrderHelperService;
import com.ziyun.pop.modules.order.vo.OrderHelpVO;
import io.renren.common.utils.R;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(value = "OrderHelperApi",tags = "订单助手")
@RestController
@RequestMapping("popApi/order")
public class OrderHelperApi {

    @Autowired
    private OrderHelperService orderHelperService;

    @ApiOperation(value = "根据传入的商户id查询订单列表")
    @ApiResponses(value = @ApiResponse(code = 200, message = "获取订单列表成功", response = OrderHelpVO.class))
    //@ApiImplicitParam(name = "sellerId", value = "商户ID", required = true, dataType = "Long", paramType = "query")
    @GetMapping("/orderHelperListApi")
    public R getOrderList(){
        return orderHelperService.getOrderHelperData(UserUtils.getCurentUser().getSellerId());
    }
}
